package com.example.a.dongtutest;

import android.animation.Animator;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.ViewAnimationUtils;
import android.widget.ImageView;

public class test1Activity extends AppCompatActivity {
private ImageView imageView1;
    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test1);
        imageView1=findViewById(R.id.iv_2);
        imageView1.setImageResource(R.drawable.test1);
        Animator anim = ViewAnimationUtils.createCircularReveal(imageView1, 0, 0, 0, (float) Math.hypot(imageView1.getWidth(), imageView1.getHeight()));
        anim.setDuration(2000);
        anim.start();

    }

}
